package demo9;


import java.time.LocalDate;
import java.time.LocalDateTime;


public class test7 {
    public static void main(String[] args) {
        //获取本地时间的日历对象（包含 时分秒）
        LocalDateTime nowDateTime = LocalDateTime.now();
        System.out.println("今天的时间："+nowDateTime);
        System.out.println("===========================");

        int hour = nowDateTime.getHour();
        System.out.println(hour);
        int minu = nowDateTime.getMinute();
        System.out.println(minu);
        int second = nowDateTime.getSecond();
        System.out.println(second);
        int nano = nowDateTime.getNano();
        System.out.println(nano);

//        System.out.println("===========================");
//        System.out.println(LocalDateTime.of(8,20));
//        System.out.println(LocalDateTime.of(8,20,30));
//        System.out.println(LocalTime.of(8,20,30,150));
//        LocalTime mTime = LocalTime.of(8,20,30,150);


    }
}
